package pojo;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import java.io.Serializable;
import java.util.List;
import java.util.Map;


@XmlAccessorType(XmlAccessType.FIELD)
// XML文件中的根标识
@XmlRootElement(name = "Demo")
// 控制JAXB 绑定类中属性和字段的排序
@XmlType(propOrder = {
        "text",
        "list",
        "map",
        "id",
})
public class Demo implements Serializable {

    private static final long serialVersionUID = 1L;

    private String text;
    private List<Object> list;
    private Map<String,Object> map;
    private Integer id;

    @Override
    public String toString() {
        return "Demo{" +
                "text='" + text + '\'' +
                ", list=" + list +
                ", map=" + map +
                ", id=" + id +
                '}';
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public List<Object> getList() {
        return list;
    }

    public void setList(List<Object> list) {
        this.list = list;
    }

    public Map<String, Object> getMap() {
        return map;
    }

    public void setMap(Map<String, Object> map) {
        this.map = map;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Demo(String text, List<Object> list, Map<String, Object> map, Integer id) {
        super();
        this.text = text;
        this.list = list;
        this.map = map;
        this.id = id;
    }

    public Demo() {
        super();
    }
}
